<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.misc.*" %>
<%@ page import="java.sql.*" %>
<%//@ include file="../init_include.jsp" %>
<%
 DBI dbi  = new DBI();

 SequenceManager sequence = (SequenceManager)session.getAttribute("SEQUENCEMANAGER");
 if ( sequence== null )
    session.setAttribute("SEQUENCEMANAGER", new SequenceManager());
	try {
	DatabaseMetaData dmd=dbi.getDataMetaData();
   out.print("1."+dmd.getDriverName()+"<br>");
   out.print("2."+dmd.getCatalogs().toString());
   String[] Types={"TABLE"};
   ResultSet rs=dmd.getPrimaryKeys("cms3",null,"cms_archive");
//dmd.getColumns("dongshan",null,"cms_archive",null);

//;dmd.getTables("MIDEA",null,null,Types);
   while(rs.next())
   {
      out.print("<br>");
         out.print(rs.getString(1)+" ");
         out.print(rs.getString(2)+" ");
         out.print(rs.getString(3)+" ");
         out.print(rs.getString(4)+" ");
         out.print(rs.getInt(5)+" ");
         out.print(rs.getString(6)+" ");
   }
 }
 catch( Exception e){
    out.print(e.getMessage());
//		response.sendRedirect("/test/admin/error.jsp?message="+e);
 }
 finally{
    dbi.closeAll();
 }
%>
<%//@ include file="../init_free.jsp" %>